{% extends 'layout.html' %}
{% block main %}
    <div id="main">
    <div class="ym-wrapper">
    <div class="ym-wbox" id="div_voyage">
    <form id="form1" method="post">
    <section>
    <div class="ym-grid">
        <div class="ym-g66 ym-gl">
            <table class="bordertable narrow">
                <thead>
                <tr>
                    <th colspan="6">运价信息</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>船名</td>
                    <td><input type="hidden" name="v_vesselid" value="{{ voyage.VesselID or '0' }}" /><input class="acvessel" name="v_vessel" value="{{ voyage.VesselNameEn or '' }}" /></td>
                    <td>航次</td>
                    <td><input name="v_voyagenumbername" value="{{ voyage.VoyageNumberName or '' }}" /></td>
                    <td>航线</td>
                    <td>
                        <select name="v_line">
                            {% for line in lines %}
                                <option value="{{ line.LineID }}" {% if line.LineID==voyage.LineID|default(0) %}selected="selected"{% endif %}>{{ line.LineName }}</option>
                            {% endfor %}
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>起运港</td>
                    <td>
                        <select name="v_loadport">
                            <option value="1">宁波</option>
                        </select>
                    </td>
                    <td>码头</td>
                    <td>
                        <select name="v_pier">
                            {% for pier in piers %}
                                <option value="{{ pier.PierID }}" {% if pier.PierID==voyage.PierID|default(0) %}selected="selected"{% endif %}>{{ pier.PierName }}</option>
                            {% endfor %}
                        </select>
                    </td>
                    <td></td>
                    <td></td>
                </tr>
                <tr>
                    <td>截/开</td>
                    <td><input name="v_cutoffsail" size="3" class="validate[custom[cutoffsail]]" value="{% if voyage.CutOff and voyage.Sail %}{{ voyage.CutOff }}/{{ voyage.Sail }}{% endif %}" /></td>
                    <td>截关日期</td>
                    <td><input id="v_cutoffdate" name="v_cutoffdate" size="10" readonly="readonly" class="validate[required]" value="{{ voyage.CutOffDate or '' }}" /></td>
                    <td>开船日期</td>
                    <td><input id="v_saildate" name="v_saildate" size="10" readonly="readonly" class="validate[required]" value="{{ voyage.SailDate or '' }}" /></td>
                </tr>

                <tr>
                    <td>船司</td>
                    <td>
                        <select name="v_shipcompany">
                            {% for shipcompany in shipcompanys %}
                                <option value="{{ shipcompany.ShipCompanyID }}" {% if shipcompany.ShipCompanyID==voyage.ShipCompanyID|default(0) %}selected="selected"{% endif %}>{{ shipcompany.ShipCompanyShort }}</option>
                            {% endfor %}
                        </select>
                    </td>
                    <td>船代</td>
                    <td>
                        <select name="v_shipagent">
                            {% for shipagent in shipagents %}
                                <option value="{{ shipagent.ShipAgentID }}" {% if shipagent.ShipAgentID==voyage.ShipAgentID|default(0) %}selected="selected"{% endif %}>{{ shipagent.ShipAgentShort }}</option>
                            {% endfor %}
                        </select>
                    </td>
                    <td>订舱</td>
                    <td>
                        <select name="v_booking">
                            {% for booking in bookings %}
                                <option value="{{ booking.BookingID }}" {% if booking.BookingID==voyage.BookingID|default(0) %}selected="selected"{% endif %}>{{ booking.BookingShort }}</option>
                            {% endfor %}
                        </select>
                    </td>
                </tr>
                <tr>
                    <td>开始期</td>
                    <td><input id="v_vaildstart" name="v_vaildstart" size="10" readonly="readonly" class="validate[required]" value="{{ voyage.VaildStart or '' }}" /></td>
                    <td>结束期</td>
                    <td><input id="v_vaildend" name="v_vaildend" size="10" readonly="readonly" class="validate[required]" value="{{ voyage.VaildEnd or '' }}" /></td>
                    <td>订舱信息</td>
                    <td><input id="v_bookinginfo" name="v_bookinginfo" size="10" value="{{ voyage.BookingInfo or '' }}" /></td>
                </tr>
                <tr>
                    <td>备注</td>
                    <td colspan="5"><textarea name="v_batchremarks" cols="60" rows="5">{{ voyage.BatchRemarks or '' }}</textarea></td>
                </tr>
                </tbody>
            </table>
        </div>
        <div class="ym-g33 ym-gr">
            <table class="bordertable narrow">
                <thead>
                <tr>
                    <th colspan="6">海运费</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>名称</td>
                    <td>20GP</td>
                    <td>40GP</td>
                    <td>40HQ</td>
                    <td>45HQ</td>
                </tr>
                <tr>
                    <td>公布价</td>
                    <td><input name="" size="4" value="{{ voyage.P20GP|int(default='*') }}" /></td>
                    <td><input name="" size="4" value="{{ voyage.P40GP|int(default='*') }}" /></td>
                    <td><input name="" size="4" value="{{ voyage.P40HQ|int(default='*') }}" /></td>
                    <td><input name="" size="4" value="{{ voyage.P45HQ|int(default='*') }}" /></td>
                </tr>
                <tr>
                    <td>会员价</td>
                    <td><input name="" size="4" value="{{ voyage.M20GP|int(default='*') }}" /></td>
                    <td><input name="" size="4" value="{{ voyage.M40GP|int(default='*') }}" /></td>
                    <td><input name="" size="4" value="{{ voyage.M40HQ|int(default='*') }}" /></td>
                    <td><input name="" size="4" value="{{ voyage.M45HQ|int(default='*') }}" /></td>
                </tr>
                <tr>
                    <td>净价</td>
                    <td><input name="" size="4" value="{{ voyage.N20GP|int(default='*') }}" /></td>
                    <td><input name="" size="4" value="{{ voyage.N40GP|int(default='*') }}" /></td>
                    <td><input name="" size="4" value="{{ voyage.N40HQ|int(default='*') }}" /></td>
                    <td><input name="" size="4" value="{{ voyage.N45HQ|int(default='*') }}" /></td>
                </tr>
                </tbody>
            </table>
            <table class="bordertable narrow">
                <thead>
                <tr>
                    <th colspan="7">海运附加费</th>
                </tr>
                </thead>
                <tbody>
                <tr>
                    <td>名称</td>
                    <td>币种</td>
                    <td>20GP</td>
                    <td>40GP</td>
                    <td>40HQ</td>
                    <td>45HQ</td>
                    <td>新增</td>
                </tr>
                {% for exfee in exfees %}
                <tr>
                    <td>
                        <select name="scc">
                            {% for surchargecate in surchargecates %}
                                <option value="{{ surchargecate.SurchargeCateID }}"
                                        {% if surchargecate.SurchargeCateID==exfee.SurchargeCateID %}
                                        selected="selected"
                                        {% endif %}
                                >{{ surchargecate.SurchargeCateShort }}</option>
                            {% endfor %}
                        </select>
                    </td>
                    <td>
                        <select name="">
                            {% for money in moneys %}
                                <option value="{{ money.MoneyID }}"
                                        {% if money.MoneyID==exfee.MoneyID %}
                                        selected="selected"
                                        {% endif %}
                                >{{ money.Money3Code }}</option>
                            {% endfor %}
                        </select>
                    </td>
                    <td><input name="" size="4" value="{{ exfee.S20GP|int(default='*') }}" /></td>
                    <td><input name="" size="4" value="{{ exfee.S40GP|int(default='*') }}" /></td>
                    <td><input name="" size="4" value="{{ exfee.S40HQ|int(default='*') }}" /></td>
                    <td><input name="" size="4" value="{{ exfee.S45HQ|int(default='*') }}" /></td>
                    <td>删除</td>
                </tr>
                {% endfor %}
                </tbody>
            </table>
        </div>
    </div>
</section>
    <input type="submit" name="submit" value="删除" />
    <input type="submit" name="submit" value="查看本批运价" />

    </form>
    </div>
    </div>
    </div>
{% endblock %}
